<template>
  <div class="full-height full-width" style="padding: 20px 0">
<!--    <div class="flex">-->
<!--      <q-icon class="iconfont icontubiao-13" style="color: #999;font-size: 22px"></q-icon>-->
<!--      <div class="margin-l-10" style="border-bottom: #d3d3d3 1px solid;height: 16px;width: calc(100% - 35px)"></div>-->
<!--    </div>-->
    <q-scroll-area class="full-width full-height" style="padding: 0 20px" :thumb-style="thumbStyle">
      <moudle-area :type="'moudle'" :data="moudleList.moudleList" :title="'语祯服务'"></moudle-area>
      <moudle-area :type="'thirdParty'" :data="moudleList.thirdPartyList" :title="'第三方服务'"></moudle-area>
    </q-scroll-area>
  </div>
</template>

<script>
import moudleList from './module-list'

import moudleArea from './moudle-area'
import _ from 'lodash'
export default {
  name: 'module-list',
  data () {
    return {
      // 滚动条样式
      thumbStyle: this.CommonConfig.thumbStyle,
      moudleList: {}
    }
  },
  created () {
    this.getList()
  },
  components: {
    moudleArea
  },
  methods: {
    getList () {
      let moudleListData = _.cloneDeep(moudleList)
      for (let i in moudleListData) {
        moudleListData[i].forEach(item => {
          item.popularity = item.popularity > 9999 ? (item.popularity / 10000).toFixed(1) + 'w' : (item.popularity).toLocaleString('en-US')
          item.users = (item.users).toLocaleString('en-US')
        })
      }
      this.moudleList = moudleListData
    }
  }
}
</script>

<style scoped lang="stylus">

</style>
